package com.lenovo.vod.player.util;

import java.util.TimerTask;

import com.lenovo.vod.player.Constant;
import com.lenovo.vod.player.Engine;

import android.os.Message;

public class UpdateProgressTask extends TimerTask {
	private Engine mEngine;

	public UpdateProgressTask(Engine engine) {
		mEngine = engine;
	}

	@Override
	public void run() {
		if (mEngine.isPlaying()) {
			Message msg = new Message();
			msg.what = Constant.MSG_UPDATE_PROGRESS;
			mEngine.getTimerTaskHandler().sendMessage(msg);
		}
	}
}
